// import axios from 'axios';
import axios from '@/libs/api.request'
import config from '@/../src/config/index';

const defaultWmsUrl = process.env.NODE_ENV === 'development'
    ? config.wmsUrl.dev
    : process.env.VUE_APP_MODE === 'testEnvironment'
        ? config.wmsUrl.dev
        :  process.env.VUE_APP_MODE === 'temporary'
            ? config.wmsUrl.temporary
            :  process.env.VUE_APP_MODE === 'prod'
                ? config.wmsUrl.pro
                : config.wmsUrl.dev;

// 宁波
// 仓储业务日报
export const storageDailySearch = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/storageDailySearch',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报合计
export const storageDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/storageDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报导出
export const exportStorageDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/exportStorageDaily',
    method: 'post',
    responseType: 'blob',
    data,
    parameter: {
        type: 'WMS'
    }
});


// 业务日报入库详情 
export const inStorageDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/inStorageDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报入库详情合计
export const inStorageDailyDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/inStorageDailyDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报入库托盘详情
export const inStorageDailyTraceData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/inStorageDailyTraceData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报入库托盘详情合计
export const inStorageDailyTraceDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/inStorageDailyTraceDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});



// 业务日报出库详情 
export const outStorageDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/outStorageDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报出库详情合计
export const outStorageDailyDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/outStorageDailyDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报出库托盘详情
export const outStorageDailyTraceData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/outStorageDailyTraceData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报出库托盘详情合计
export const outStorageDailyTraceDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/outStorageDailyTraceDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});



// 业务日报分色详情 
export const separateDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/separateDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报分色详情合计
export const separateDailyDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/separateDailyDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报分色托盘详情
export const separateDailyTraceData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/separateDailyTraceData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报分色托盘详情合计
export const separateDailyTraceDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/separateDailyTraceDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});



// 业务日报转入详情 
export const stockTransferInDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/stockTransferInDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报转入详情合计
export const stockTransferInDailyDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/stockTransferInDailyDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});

// 业务日报转出详情 
export const stockTransferOutDailyData = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/stockTransferOutDailyData',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});
// 仓储业务日报转出详情合计
export const stockTransferOutDailyDataSum = (data, wmsUrl = defaultWmsUrl) => axios.request({
    url: wmsUrl + '/ccis/statistic/stockTransferOutDailyDataSum',
    method: 'post',
    data,
    parameter: {
        type: 'WMS'
    }
});

